package com.dgut.jpa.Entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "user")
@Data                              //get，set
@NoArgsConstructor                 //无参构造
@AllArgsConstructor
@DynamicInsert
@DynamicUpdate
public class User {
    /*@GeneratedValue(strategy = GenerationType.IDENTITY)
    private int id;*/
    @Id
    @Column(name = "openid" , length=50)
    private String openid;
    @Column(name = "head" , length =250)
    private String head;//头像
    @Column(name = "account" , length = 30)
    private String account;//账号
    @Column(name = "password", length = 30)
    private String password;//密码
    @Column(name = "name", length = 30)
    private String name;//名字
    @Column(name = "houseid", length = 30)
    private String houseid;//房号
    @Column(name = "cardid", length = 30)
    private String cardid;//身份证
    @Column(name = "power", length = 30)
    private String power;//个人权限
    @Column(name = "status", length = 30)
    private String status;//健康状况，账号锁定

}